Domain Method
Syntax
Domain as WindowsServices::ActiveDirectory::Domain ()
Domain as WindowsServices::ActiveDirectory::Domain (type as WindowsServices::ActiveDirectory::Domain::ConfigurationType)
Domain as WindowsServices::ActiveDirectory::Domain (name as C, [userid as C], [password as C], [ou as C], [useSecureConnection as L], [host as C])
Arguments
- typeWindowsServices::ActiveDirectory::Domain::ConfigurationType
The way in which to initialize the Domain object. WindowsServices::ActiveDirectory::Domain::ConfigurationType::DEFAULT is equivalent to the parameterless constructor. WindowsServices::ActiveDirectory::Domain::ConfigurationType::SECURITY_CONFIGURATION useSecureConnection the security configuration publish to the Application Server or Application Server for IIS.
- nameCharacter
The Active Directory domain name.
- useridCharacter
The userid for accessing Active Directory. Can be omitted or set to empty string '' if credentials are not needed to access Active Directory. Use an empty string if need to specify parameters after it.
- passwordCharacter
The password for accessing Active Directory. Can be omitted or set to empty string '' if credentials are not needed to access Active Directory. Use an empty string if need to specify parameters after it.
- ouCharacter
An organizational unit use to restrict the set of users allowed to when validating credentials (i.e. log into an application). Can be omitted or set to empty string '' if not needed. Use an empty string if need to specify parameters after it.
- useSecureConnectionLogical
LDAP is used to connect to Active Directory. Set useSecureConnection to .T. to connect using LDAPS. Defaults to .F..
- hostCharacter
Internal use only.
Returns
- ResultWindowsServices::ActiveDirectory::Domain
Returns a WindowsServices::ActiveDirectory::Domain object. A domain object will always be returned. However, you must check the returned domain object's CallResult member to see if the object is valid and created successfully.
Description
Create a WindowsServices::ActiveDirectory::Domain object.
'The follow line assumes that the machine is joined to an Active Directory domain and is allow to query Active Directory. dim domain as WindowsServices::ActiveDirectory::Domain = new WindowsServices::ActiveDirectory::Domain() if domain.CallResult.Success then ?"The domain name is " + domain.Name + "<br/>" else ?"There was an error connecting to an Active Directory domain: " + domain.CallResult.Text + "<br/>" end if